<template>
  <common-page
    ref="commonPage"
    page-type="editPage"
    :bg-path="bgPath"
    :web-path="webPath"
    :columns="columns"
    :search-items="searchItems"
    :form-items="formItems"
    :editor-items="editorItems"
  />
</template>
<script>
export default {
  data() {
    return {
      // ===== ===== ===== ===== 全局属性 ===== ===== ===== =====
      // 后台接口路径
      bgPath: 'health/content/label/contentinfo',
      // Web路径
      webPath: 'health/content/label/ContentInfo',
      // ===== ===== ===== ===== 页面配置 ===== ===== ===== =====
      // 搜索内容
      searchItems: [
        {
          rowIndex: 1,
          items: [
            {
              code: "code",
              name: "编码",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "conName",
              name: "内容标题",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "labelNameGroup",
              name: "标签组",
              type: "group",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "typeSign",
              name: "类别标识",
              type: "select",
              span: 6,
              config: {
                edit: false,
                options: [
                  { "key": "1", "value": "健康资讯" },
                  { "key": "2", "value": "健康方案" },
                  { "key": "3", "value": "食谱" },
                  { "key": "4", "value": "茶饮" },
                  { "key": "5", "value": "运动信息" },
                  { "key": "6", "value": "运动视频" },
                  { "key": "7", "value": "穴位信息" },
                  { "key": "8", "value": "穴位视频" },
                  { "key": "9", "value": "用药指导" },
                  { "key": "10", "value": "中医药信息" },
                  { "key": "11", "value": "音乐" },
                  { "key": "12", "value": "商品" }
                ],
                keyField: "key",
                valueField: "value"
              }
            }
          ]
        }
      ],
      // 列表内容
      columns: [
        {
          code: "code",
          name: "编码",
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "conCode",
          name: "内容编码",
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "conName",
          name: "内容标题",
          type: "popup",
          config: {
            edit: false
          }
        },
        {
          code: "conCoverImg",
          name: "内容封面图片地址",
          type: "oss",
          config: {
            edit: false
          }
        },
        {
          code: "conKeyword",
          name: "内容关键词",
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "conDescribe",
          name: "内容描述",
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "content",
          name: "内容",
          type: "editor",
          config: {
            edit: false
          }
        },
        {
          code: "robotContent",
          name: "机器人内容",
          type: "editor",
          config: {
            edit: false
          }
        },
        {
          code: "padContent",
          name: "PAD内容",
          type: "editor",
          config: {
            edit: false
          }
        },
        {
          code: "htmlContent",
          name: "HTML内容",
          type: "editor",
          config: {
            edit: false
          }
        },
        {
          code: "pcContent",
          name: "PC内容",
          type: "editor",
          config: {
            edit: false
          }
        },
        {
          code: "visitNum",
          name: "访问量",
          type: "number",
          config: {
            edit: false
          }
        },
        {
          code: "labelGroup",
          name: "标签组",
          type: "group",
          config: {
            edit: false
          }
        },
        {
          code: "typeSign",
          name: "类别标识",
          type: "select",
          config: {
            edit: false,
            options: [
              { "key": "1", "value": "健康资讯" },
              { "key": "2", "value": "健康方案" },
              { "key": "3", "value": "食谱" },
              { "key": "4", "value": "茶饮" },
              { "key": "5", "value": "运动信息" },
              { "key": "6", "value": "运动视频" },
              { "key": "7", "value": "穴位信息" },
              { "key": "8", "value": "穴位视频" },
              { "key": "9", "value": "用药指导" },
              { "key": "10", "value": "中医药信息" },
              { "key": "11", "value": "音乐" },
              { "key": "12", "value": "商品" }
            ]
          }
        }
      ],
      // 增加/修改/详情 表单
      formItems: [
        {
          rowIndex: 1,
          items: [
            {
              code: "code",
              name: "编码",
              span: 6,
              type: "text",
              config: {
                edit: false,
                require: true
              }
            },
            {
              code: "conCode",
              name: "内容编码",
              span: 6,
              type: "text",
              config: {
                edit: false,
                require: true
              }
            },
            {
              code: "conName",
              name: "内容标题",
              type: "text",
              span: 6,
              config: {
                edit: false,
                require: true
              }
            },
            {
              code: "conCoverImg",
              name: "内容封面图片地址",
              type: "oss",
              span: 6,
              config: {
                edit: false,
                defaultValue: ""
              }
            },
            {
              code: "conKeyword",
              name: "内容关键词",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "conDescribe",
              name: "内容描述",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "visitNum",
              name: "访问量",
              span: 6,
              type: "number",
              config: {
                edit: false,
                precision: 2
              }
            },
            {
              code: "labelGroup",
              name: "标签组",
              span: 6,
              type: "group",
              config: {
                edit: false,
                url: "health/content/label/contentlabel"
              }
            },
            {
              code: "typeSign",
              name: "类别标识",
              type: "select",
              span: 6,
              config: {
                edit: false,
                options: [
                  { "key": "1", "value": "健康资讯" },
                  { "key": "2", "value": "健康方案" },
                  { "key": "3", "value": "食谱" },
                  { "key": "4", "value": "茶饮" },
                  { "key": "5", "value": "运动信息" },
                  { "key": "6", "value": "运动视频" },
                  { "key": "7", "value": "穴位信息" },
                  { "key": "8", "value": "穴位视频" },
                  { "key": "9", "value": "用药指导" },
                  { "key": "10", "value": "中医药信息" },
                  { "key": "11", "value": "音乐" },
                  { "key": "12", "value": "商品" }
                ],
                keyField: "key",
                valueField: "value"
              }
            }
          ]
        }
      ],
      // 富文本编辑器
      editorItems: [
        {
          key: "content",
          name: "内容"
        },
        {
          key: "robotContent",
          name: "机器人内容"
        }, {
          key: "padContent",
          name: "PAD内容"
        }, {
          key: "htmlContent",
          name: "HTML内容"
        }, {
          key: "pcContent",
          name: "PC内容"
        }
      ]
    }
  }
}
</script>
